//
//  BaseNetworkRequest+GroupCategories.m
//  ShiWuPai
//
//  Created by app on 16/11/30.
//  Copyright © 2016年 QQ:244987427. All rights reserved.
//

#import "BaseNetworkRequest+GroupCategories.h"
#import "WHBaiKeGroupCategory.h"
#import <YYModel.h>

NSString *const kGroupCategoriesPath=@"categories/list";
@implementation BaseNetworkRequest (GroupCategories)
+(void)getGroupCategoriesSuccess:(void(^)(id responseObj,NSError *error))completionHandler{
    [self rquestWithType:@"GET" Path:kGroupCategoriesPath Parameters:nil success:^(id responseObj, NSError *error) {
        if (!error) {
            WHBaiKeGroupCategory *baiKeGroupCategory=[WHBaiKeGroupCategory yy_modelWithJSON:responseObj];
            completionHandler(baiKeGroupCategory,nil);
        }
        else{
            completionHandler(nil,error);
        }
    }];
}
@end
